package(default_visibility = ["//visibility:public"])

cc_library(
    name = "basics-cxx",
    srcs = [
        "basics.cpp",
        "execmeta.cpp",
        "fileutils.cpp",
        "iputils.cpp",
        "modinit.cpp",
        "processutils.cpp",
        "randutils.cpp",
        "ridgen.cpp",
        "sockutils.cpp",
        "strutils.cpp",
        "mempool.cpp",

        "callback.h",
        "callback1.h",
        "classcallback.h",
        "classcallback1.h",
        "execmeta.h",
        "fileutils.h",
        "iputils.h",
        "modinit.h",
        "processutils.h",
        "randutils.h",
        "ridgen.h",
        "sockutils.h",
        "spconsts.h",
        "spfuncs.h",
        "sphash.h",
        "sprcodes.h",
        "sptest.h",
        "sptypes.h",
        "strutils.h",
        "mempool.h",
    ],
    hdrs = [ 
        "basics.h",
    ],
    copts = [
        "-Ithird_party",
        "-Iheron/common/src/cpp",
        "-I.",
    ],
    deps = [
        "//config:config-cxx",
        "@com_github_google_glog//:glog",
        "@com_github_gflags_gflags//:gflags",
        "@com_github_gperftools_gperftools//:tcmalloc",
        "//third_party/kashmir:kashmir-cxx",
        "@com_google_protobuf//:protobuf",
    ] + select({
        "//tools/platform:darwin": [], 
        "//conditions:default": ["@org_nongnu_libunwind//:libunwind"],
    }),
    linkstatic = 1,
)
